package com.wcx.behavior.strategy;

/**
 * 项目: design-pattern-githupdemo
 * <p>
 * 功能描述:
 *
 * @author: WuChengXing
 * @create: 2021-01-11 23:41
 **/
public class DemoTest {
    public static void main(String[] args) {
        Role roleA = new RoleA("A");
        roleA.setAttackBehavior(new AttackJY())
                .setDefendBehavior(new DefendTBS())
                .setDisplayBehavior(new DisplayRole("A"))
                .setRunBehavior(new RunJCTQ());
        roleA.display();
        roleA.run();
        roleA.attack();
        roleA.defend();
    }
}
